import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { AdminComponent } from './';
import { CenterComponent } from './center';
import { EditComponent } from './edit/edit.component';

const routes: Routes = [
  {
      path: 'admin',
      component: AdminComponent,
      children: [
        {
          path: '',
          children: [
            { path: 'center', component: CenterComponent },
            { path: 'edit/:id', component: EditComponent }
          ]
        }
      ]
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule],
})
export class AdminRoutingModule { }
